<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%@ taglib uri="/WEB-INF/hexacta.tld" prefix="hexacta"%>

<head>
<sx:head cache="true" />
<link rel="stylesheet" href="/hrs-intranet/styles/displaytag.css"
	type="text/css" />
</head>

<s:include value="errorsSection.jsp"></s:include>


<s:form cssClass="formClass">
	<s:hidden id="selectedProjectForEdit" name="selectedProjectForEdit" />

	<s:if
		test="%{(selectedProjectForEdit != null)&&(selectedProjectForEdit != '')}">
		<h2 style="position: relative; top: -10px;">Edit project</h2>
	</s:if>
	<s:else>
		<h2 style="position: relative; top: -10px;">Create new project</h2>
	</s:else>

	<sx:autocompleter searchType="startword" showDownArrow="false"
		autoComplete="false" name="selectedProjectName" label="Project Name" />

	<sx:autocompleter label="Contract Type" showDownArrow="false"
		searchType="startword" name="selectedContractType"
		forceValidOption="false" list="contractTypeList" listKey="string"
		listValue="string" />

	<sx:autocompleter list="allClientList" listValue="name"
		searchType="startword" listKey="id" showDownArrow="false"
		keyName="selectedClientId" name="selectedClientName" label="Client" />

	<sx:autocompleter list="employeeList" listValue="person.name"
		searchType="startword" listKey="id" showDownArrow="false"
		keyName="selectedEmployeeId" name="selectedEmployeeName"
		label="Leader" />

	<s:textarea name="description" label="Description" rows="4" cols="16"
		cssClass="formTextAreaClass" wrap="50" />

	<sx:datetimepicker id="startDate" name="selectedStartDate"
		label="Start Date" displayFormat="dd/MM/yyyy" />

	<sx:datetimepicker id="endDate" name="selectedEndDate" label="End Date"
		displayFormat="dd/MM/yyyy" />

	<s:submit action="ProjectAction_saveProject" key="Ok" cssClass="btn"
		id="okbtn" cssStyle="position:relative; left:-175px; top:+20px;" />
		
	<s:submit key="Cancel" cssClass="btn" id="addbtn"
		action="ProjectAction_filterProjects" cssStyle="position:relative; left:-80px; top: -6px;"/>
		
</s:form>
